import {serverConfig} from "./ApiAIChat.ts";

const generatePayload = (formValues: object) => {
    return {

        method: 'POST',
        headers: {
            'Content-Type': 'application/json; charset=UTF-8',
        },
        body: JSON.stringify({
            operate: "risk",
            token: "123",
            operate_data: formValues
        }),
    };
}
export const analysisForm = (formValues: object) => {
    return fetch(serverConfig.server + "/api/ad", generatePayload(formValues))
}